package com.dorado.example.model;

import com.dorado.kernel.base.model.BaseModel;
import com.dorado.kernel.base.serializer.Long2String;
import com.dorado.kernel.base.serializer.String2Long;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.*;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import lombok.Data;
import lombok.ToString;

@Data
@ToString
@Table(name = "ads_crm_cargoowner_orderpay_mon")
public class CargoOwner extends BaseModel {
    /**
     * 主键ID
     */
    @Id
    @Column(name = "id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @JsonSerialize(using=Long2String.class)
    @JsonDeserialize(using=String2Long.class)
    private Long id;

    /**
     * 数据日期
     */
    @Column(name = "data_date")
    private String dataDate;

    /**
     * 货主编码
     */
    @Column(name = "company_code")
    private String companyCode;

    /**
     * 货主ID
     */
    @Column(name = "company_id")
    @JsonSerialize(using=Long2String.class)
    @JsonDeserialize(using=String2Long.class)
    private Long companyId;

    /**
     * 业务员编码
     */
    @Column(name = "uid")
    @JsonSerialize(using=Long2String.class)
    @JsonDeserialize(using=String2Long.class)
    private Long uid;

    /**
     * 首单时间
     */
    @Column(name = "first_time")
    private Date firstTime;

    /**
     * 末单时间
     */
    @Column(name = "last_time")
    private Date lastTime;

    /**
     * 新增订单数_月数据
     */
    @Column(name = "order_num")
    private Integer orderNum;

    /**
     * 新增订单金额_月数据
     */
    @Column(name = "freight_total")
    private BigDecimal freightTotal;

    /**
     * 实付金额_月数据
     */
    @Column(name = "ops_amount")
    private BigDecimal opsAmount;

    /**
     * 支付完成数_月数据
     */
    @Column(name = "order_over_num")
    private Integer orderOverNum;

    /**
     * 统计时间
     */
    @Column(name = "statistical_date")
    private Date statisticalDate;
}